﻿<!DOCTYPE html>
<html>
<head>
	<meta name="keywords" content="python 教程" />
	<title></title>
</head>
<body>
	{{ title|safe }}
    {{ tips|md|safe }}
    {{ read_data("<h1>测试在模板中调用服务端的函数</h1>")|safe }}
    <h1>再次输出title:{{ title|safe }}</h1>
	<nav>
        <!--注意url_for函数在jinjia2中的使用-->
        <a target="_blank" href="{{ url_for(".index") }}">index</a>
        <a target="_blank" href="{{ url_for(".login") }}">login</a>
		<a target="_blank" href="{{ url_for(".services") }}">services</a>
		<a target="_blank" href="{{ url_for(".about") }}">about</a>
		<a target="_blank" href="{{ url_for(".upload") }}">upload</a>

	</nav>
	<p>你好吗1122</p>

<!--熟悉下jinjia2的语法-->

    <!--jinjia2定义变量 -->
{% set links = [
    ('主页',url_for('.index')),
    ('登录',url_for('.login')),
    ('服务',url_for('.services'))
] %}
    {{ links }}
<div>
    这个竖导航
    {% for link,href in links %}
       <p><a target="_blank" href="{{ href }}">{{ link }}</a></p>
    {% endfor %}
</div>


</body>
</html>